﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using GCT.Foundation.EntityFrameworkCore;

namespace GCT.Foundation.Seed.Host
{

    public class InitialHostDbBuilder
    {
        private readonly FoundationTemplateDbContext _context;

        public InitialHostDbBuilder(FoundationTemplateDbContext context)
        {
            _context = context;
        }

        public void Create()
        {
            new DefaultLanguagesCreator(_context).Create();
            new HostRoleAndUserCreator(_context).Create();
            new DefaultSettingsCreator(_context).Create();
            _context.SaveChanges();
        }
    }
}
